_require local "../../../../basis.smi"
(* _require local "../../../../smlformat-lib.smi" *)

_require "../../../libs/ids/main/LocalID.smi"
_require local "../../../libs/env/main/SEnv.smi"
_require "../../../compilerIRs/typedcalc/main/TypedCalc.ppg.smi"
_require "../../../data/types/main/Types.ppg.smi"
_require "../../../data/symbols/main/Loc.smi"
_require "../../../data/symbols/main/RecordLabel.smi"
_require "../../../data/symbols/main/Symbol.smi"

_require local "../../userlevelprimitive/main/UserLevelPrimitive.smi"
_require local "../../debug/main/Bug.smi"

(* _require local "./TyToReifiedTy.smi" *)
_require local "./ReifyUtils.smi"
_require local "./ReifiedTyData.smi"

_require "./ReifiedTy.ppg.smi"

structure ReifyTy =
struct
(*
  val ReifiedTy : Loc.loc -> ReifiedTy.reifiedTy -> {exp:TypedCalc.tpexp, ty:Types.ty}
  val ReifiedTyWithLookUp 
      : (BoundTypeVarID.id -> {id:VarID.id, path:Symbol.longsymbol, ty:Types.ty} option)
        -> Loc.loc -> ReifiedTy.reifiedTy -> {exp:TypedCalc.tpexp, ty:Types.ty}
  val RecordTy : Loc.loc
                 -> ReifiedTy.reifiedTy RecordLabel.Map.map
                 -> {exp:TypedCalc.tpexp, ty:Types.ty}
*)
  val TyRep  : Loc.loc -> ReifiedTy.tyRep -> {exp:TypedCalc.tpexp, ty:Types.ty}
  val TyRepWithLookUp
      : (BoundTypeVarID.id -> {id:VarID.id, path:Symbol.longsymbol, ty:Types.ty} option)
        -> Loc.loc -> ReifiedTy.tyRep -> {exp:TypedCalc.tpexp, ty:Types.ty}
end
